package org.danng.taobao;

import javax.sql.DataSource;

import org.danng.domain.TaoBaoItem;
import org.nutz.dao.Dao;
import org.nutz.dao.impl.NutDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class ItemDAO {
	private DataSource dataSource;
	@Autowired
	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	public void addItem(TaoBaoItem item) {
		Dao dao = new NutDao(dataSource);
		dao.insertWith(item,"skus");
	}

}
